using FytSoa.Domain.Core.Result;
using System.Threading.Tasks;
using FytSoa.Domain.Core.Param;
using Microsoft.AspNetCore.Http;

namespace FytSoa.Application.Sys
{
    /// <summary>
    /// 资源文件信息表 服务接口
    /// </summary>
    public interface ISysFileInfoService:IApplicationService
    {
        /// <summary>
        /// 查询所有——分页
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<PageResult<SysFileInfoDto>>> GetPagesAsync (PageParam<CommonParam> param);
        
        /// <summary>
        /// 根据主键查询
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<SysFileInfoDto>> GetAsync (long id);


        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> AddAsync (SysFileInfoDto model);

        /// <summary>
        /// 上传文件
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<FileDto>> Upload(IFormFile file, string columnId, string user);

        /// <summary>
        /// 文件移动
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> Move(FileMoveParam param);

        /// <summary>
        /// 文件复制
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> Copy(FileCopyParam param);

        /// <summary>
        /// 文件重命名
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> ReName(FileReNameParam param);

        /// <summary>
        /// 修改
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> ModifyAsync (SysFileInfoDto model);

        /// <summary>
        /// 删除-支持多个删除，逗号分隔
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<bool>> DeleteAsync (string ids);
    }
}
